<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="t_stock" :rules="rules" label-width="100px" id="mvcfm">
      <el-button @click="gotoPage('/psi/supplychainmana/DeliveryRecord?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 产品出库 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="出库仓库" prop="">
              {{t_stock.firm_name}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="出库条形码" prop="">
              {{t_stock.stock_barcode}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="出库单号" prop="">
              {{t_stock.stock_num}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="出库日期" prop="">
              {{getDateTimeString(t_stock,'store_intime')}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="输入人" prop="">
              {{t_stock.ucontact_name}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="输入日期" prop="">
              {{getDateTimeString(t_stock,'cdate')}}
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div class="form-unit">
        <span class="mvc-title-left"> 出库产品列表 </span>
      </div>
      <el-table :data="s_goods">
        <el-table-column label="出库供应商" prop="client_name">
        </el-table-column>
        <el-table-column label="产品名称" prop="product_name">
        </el-table-column>
        <el-table-column label="规格型号" prop="">
        </el-table-column>
        <el-table-column label="出库价格" prop="product_price">
        </el-table-column>
        <el-table-column label="出库数量" prop="product_num">
        </el-table-column>
        <el-table-column label="出库时间" prop="record_intime">
          <template slot-scope="scope">
            {{getDateTimeString(scope.row,'record_intime')}}
          </template>
        </el-table-column>
      </el-table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'DeliveryDetil',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        t_stock: {
          firm_name: null,
          stock_barcode: null,
          stock_num: null,
          store_intime: null,
          ucontact_name: null,
          cdate: null,
        },
        s_goods: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/DeliveryAction/deliveryDetil?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
